package com.ziyueyuwen.xiniao.service;

import com.alibaba.fastjson.JSONArray;
import com.ziyueyuwen.xiniao.base.exception.nullpoint.LessonNotExistException;
import com.ziyueyuwen.xiniao.bean.ZyClassLessonInfo;
import com.ziyueyuwen.xiniao.bean.ZyClassLessonUser;
import com.ziyueyuwen.xiniao.bean.vo.ZyClassLessonUserVO;
import com.ziyueyuwen.xiniao.enums.ClassUserTypeEnum;

import java.util.List;
import java.util.Set;

/**
 * @author wancheng  on 2019/1/22.
 */
public interface LessonUserService {
    /**
     * 批量添加
     * @param lessonUsers
     */
    void insertBatch(List<ZyClassLessonUser> lessonUsers);

    /**
     * 批量添加
     * @param classId
     * @param teacherAccount
     * @param lessonInfos
     */
    void insertBatch(Integer classId,String teacherAccount, List<ZyClassLessonInfo> lessonInfos);

    /**
     * 获取课节人员
     * @param lessonId
     * @param type
     * @return
     */
    List<ZyClassLessonUser> getLessonUser(Integer lessonId,ClassUserTypeEnum type);

    /**
     *单表查询
     * @param param
     * @return
     */
    ZyClassLessonUser getLessonUser(ZyClassLessonUser param);

    /**
     * 获取老师
     * @param lessonId
     * @return
     */
    ZyClassLessonUser getTeacher(Integer lessonId);

    /**
     * 数据库修改学生
     * @param lessonId
     * @param teacherAccount
     */
    void updateTeacher(Integer lessonId,String teacherAccount);

    /**
     * 删除课节老师
     * @param lessonId
     */
    void deleteTeacher(Integer lessonId);

    /**
     * 删除课节下所有人员
     * @param lessonId
     */
    void deleteLessonUser(Integer lessonId);

    /**
     * 删除学生
     * @param lessonId
     * @param studentAccount
     */
    void deleteLessonStudent(Integer lessonId,String studentAccount);

    /**
     * 添加学生
     * @param classId
     * @param studentAccount
     */
    void addLessonStudent(Integer classId, List<String> studentAccount);

    /**
     * 删除课节和学生
     * 删除未上完课节的相关信息
     * @param classId
     * @param studentAccount
     */
    void deleteClassLessonStudent(Integer classId, List<String> studentAccount);

    /**
     *
     * @param lessonId
     * @return
     */
    List<ZyClassLessonUserVO> getStudent(Integer lessonId);
}
